package com.younion.vo;

import com.younion.common.constants.PlateformType;
import com.younion.common.constants.Status;
import com.younion.common.constants.TemplateScope;
import com.younion.common.constants.TemplateTargetType;
import com.younion.common.constants.TemplateType;

import cpcns.component.common.base.BaseVO;
import cpcns.persister.converter.IDomainObject;
import cpcns.persister.service.CompositeID;


 
public class MsgTemplateVO extends BaseVO implements IDomainObject,Cloneable{

	/**  */
	private static final long serialVersionUID = -1L;

 
	private Integer id;

	 
	private String type;

 
	private String content;

	 
	private String status;

	 
	private String customerIds;

 
	private String scope;
	
	private String template;

 
	private String name;
	
	private String plateformType;
	
	private String plateformTypeTitle;
	
	private String statusTitle;
	
	private String scopeTitle;
	
	private String typeTitle;
	
	private String customerNames;
	
	private String targetType;

	/**
	 * 
	 */
	public MsgTemplateVO() {
	}

	/** 
	 * @return the id
	 */ 
	public Integer getId() {
		return id;
	}

	/** 
	 * @param id the id to set 
	 */ 
	public void setId(Integer id) {
		this.id = id;
	}

	/** 
	 * @return the type
	 */ 
	public String getType() {
		return type;
	}

	/** 
	 * @param type the type to set 
	 */ 
	public void setType(String type) {
		this.type = type;
	}

	/** 
	 * @return the content
	 */ 
	public String getContent() {
		return content==null?"":content;
	}

	/** 
	 * @param content the content to set 
	 */ 
	public void setContent(String content) {
		this.content = content;
	}

	/** 
	 * @return the status
	 */ 
	public String getStatus() {
		return status;
	}

	/** 
	 * @param status the status to set 
	 */ 
	public void setStatus(String status) {
		this.status = status;
	}

	/** 
	 * @return the customerIds
	 */ 
	public String getCustomerIds() {
		return customerIds;
	}

	/** 
	 * @param customerIds the customerIds to set 
	 */ 
	public void setCustomerIds(String customerIds) {
		this.customerIds = customerIds;
	}

	/** 
	 * @return the scope
	 */ 
	public String getScope() {
		return scope;
	}

	/** 
	 * @param scope the scope to set 
	 */ 
	public void setScope(String scope) {
		this.scope = scope;
	}

	/** 
	 * @return the name
	 */ 
	public String getName() {
		return name;
	}

	/** 
	 * @param name the name to set 
	 */ 
	public void setName(String name) {
		this.name = name;
	}

	public CompositeID getCompositeID(){
		CompositeID _id = super.getCompositeID();
		_id.clear();
		if(id != null){
			_id.addKey("id", id);
		}
		return _id;
	}
	
	@Override
	 public boolean equals(Object obj) {
		 if(obj == null) return false;
		 if (this == obj) {
		     return true;
		 }
		 if (obj instanceof MsgTemplateVO) {
			 MsgTemplateVO another = (MsgTemplateVO)obj;
		     if(this.getId() == another.getId())
		    	 return true;
		 }
		 return false;
	}

	public String getPlateformType() {
		return plateformType;
	}

	public void setPlateformType(String plateformType) {
		this.plateformType = plateformType;
	}

	public String getPlateformTypeTitle() {
		return (getPlateformType() == null || "".equals(getPlateformType()))  ? null : PlateformType.valueOfName(getPlateformType()).getTitle();
	}

	public void setPlateformTypeTitle(String plateformTypeTitle) {
		this.plateformTypeTitle = plateformTypeTitle;
	}

	public String getStatusTitle() {
		return (getStatus() == null || "".equals(getStatus())) ? null : Status.valueOfName(getStatus()).getTitle();
	}

	public void setStatusTitle(String statusTitle) {
		this.statusTitle = statusTitle;
	}

	public String getScopeTitle() {
		return (getScope() == null || "".equals(getScope()))  ? null : TemplateScope.valueOfName(getScope()).getTitle();
	}

	public void setScopeTitle(String scopeTitle) {
		this.scopeTitle = scopeTitle;
	}

	public String getTypeTitle() {
		return (getType() == null || "".equals(getType()))  ? null : TemplateType.valueOfName(getType()).getTitle();
	}

	public void setTypeTitle(String typeTitle) {
		this.typeTitle = typeTitle;
	}

	public String getCustomerNames() {
		return customerNames;
	}

	public void setCustomerNames(String customerNames) {
		this.customerNames = customerNames;
	}

	public String getTargetType() {
		return targetType;
	}

	public void setTargetType(String targetType) {
		this.targetType = targetType;
	}
	
	public String getTargetTypeTitle() {
		return (getTargetType() == null || "".equals(getTargetType()))  ? null : TemplateTargetType.valueOfName(getTargetType()).getTitle();
	}

	public String getTemplate() {
		return template;
	}

	public void setTemplate(String template) {
		this.template = template;
	}
	
	
}
